// api
const request = require('../utils/request')

//  首页 轮播图
export function homePic(data) {
    return request({
        url: '/mdata.ptres/cvMdaPtres/listToWx',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}

// 活动 列表
export function actList(data) {
    return request({
        url: '/custom.sp/cvCusSp/listWx',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx'
        },
        data
    })
}

// 活动 详情
export function actInfo(data) {
    return request({
        url: '/custom.sp/cvCusSp/getWx',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx'
        },
        data
    })
}


//  单车毛利 列表
export function gProfitList(data) {
    return request({
        url: '/sales.so/cvSalSo/daGprofitQuery',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}

//  资源管控 列表
export function gDataList(data) {
    return request({
        url: '/da.rescontrol/cvDaRescontrol/listWx',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}

//  超期统计 列表
export function overdueList(data) {
    return request({
        url: '/da.stat/delayDeli/list',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}

//  欠款统计 列表
export function debtList(data) {
    return request({
        url: '/da.stat/debtStat/list',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}

// 资源管控 业务办理  列表  functionCode：res资源；busi业务
export function allotList(data) {
    return request({
        url: '/sales.so/cvSalSoWx/queryBusiWx',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}

// 资源管控 业务办理  详情  
export function allotInfo(data) {
    return request({
        url: '/sales.so/cvSalSoWx/oneBusi',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}

// 资源管控 业务办理  操作
export function allotHandle(data) {
    return request({
        url: '/sales.so/cvSalSoWx/dealBusiWx',
        method: 'post',
        header: {
            "Content-Type": "application/json",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}

// 资源管控 业务办理  底盘号列表  
export function chaList(data) {
    return request({
        url: '/sales.so/cvSalSoWx/queryChaNo',
        method: 'get',
        header: {
            "Content-Type": "application/x-www-form-urlencoded",
            'reqType': 'wx',
            'X-Access-Token': wx.getStorageSync('token')
        },
        data
    })
}